﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Tulde.Windows.Amazon
{
    internal static class Settings
    {
        private const string DESTINATION = "ecs.amazonaws.com";
        private const string SERVICE = "AWSECommerceService";
        private const string NAMESPACE = "http://webservices.amazon.com/AWSECommerceService/2009-03-31";
        private const string VERSION = "2009-03-31";


        public static string Version { get; set; }
        public static string Namespace { get; set; }
        public static string Service { get; set; }
        public static string Destination { get; set; }

        static Settings()
        {
            Version = GetConfigString(Constants.Version, VERSION);
            Service = GetConfigString(Constants.Service, SERVICE);
            Namespace = GetConfigString(Constants.Namespace, NAMESPACE);
            Destination = GetConfigString(Constants.Namespace, DESTINATION);
        }

        private static string GetConfigString(string key,string defaultValue)
        {
            return  ConfigurationManager.AppSettings[key] ?? defaultValue;
          
        }
       
    }
}
